package cn.tedu.review;

import java.util.Arrays;

/*本类用于复习数组*/
public class TestArray {
    public static void main(String[] args) {
//        创建静态数组
        int[]a =new int []{1,2,3,4,5,6};
        int[]a1 = {1,2,3,4,5,6};
//        创建动态数组
        int[]a2 = new int [5];
        a2[0] = 1;
        a2[1] = 2;
        a2[2] = 3;
        a2[3] = 4;
        a2[4] = 5;
        System.out.println(Arrays.toString(a));
        System.out.println(Arrays.toString(a1));
        System.out.println(Arrays.toString(a2));

        System.out.println(a.length);
        System.out.println(a1.length);
        System.out.println(a2.length);

    }
}
